package com.arpa.wms.domain.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.arpa.wms.domain.enums.WmsTaskTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 任务中心 DTO
 * </p>
 *
 * @author LEO
 * @since 2020-10-09
 */
@Data
@ApiModel(value = "TaskVO对象", description = "任务中心")
public class WmsTaskVO implements Serializable {


    @ApiModelProperty(value = "任务号")
    private String code;

    @ApiModelProperty(value = "关联单号")
    private String sourceCode;

    @ApiModelProperty(value = "仓库")
    private String warehouseCode;

    @ApiModelProperty(value = "所属机构Code")
    private String groupCode;

    @ApiModelProperty(value = "任务类型：RECEIVE收货、PUTAWAY上架、PICKING拣货、CHECK复核、INVENTORY盘点、MOVE移位")
    private WmsTaskTypeEnum taskType;

    @ApiModelProperty(value = "商品种数")
    private Integer goodsTypeQuantity;

    @ApiModelProperty(value = "库位")
    private String location;

    @ApiModelProperty(value = "库位名称")
    private String locationName;

    @ApiModelProperty(value = "商品件数")
    private BigDecimal goodsQuantity;

    @ApiModelProperty(value = "作业数量")
    private BigDecimal jobQuantity;

    @ApiModelProperty(value = "作业人姓名")
    private String operatorName;

    @ApiModelProperty(value = "作业人")
    private String operatorBy;

    @ApiModelProperty(value = "指派人姓名")
    private String assignName;

    @ApiModelProperty(value = "指派人")
    private String assignBy;

    @ApiModelProperty(hidden = true, value = "指派时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtAssign;

    @ApiModelProperty(value = "状态:WAITING（待作业），WORKING（作业中），COMPLETED（作业完成）")
    private String jobStatus;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "指派状态：0未指派，1已指派")
    private Integer assign;

    @ApiModelProperty(value = "是否有容器: 0 无容器，普通上架；1 有容器，托盘上架")
    private Integer container;

    /**
     * 创建人
     */
    @ApiModelProperty(hidden = true)
    private String createdBy;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createdName;
    /**
     * 修改人
     */
    @ApiModelProperty(hidden = true)
    private String modifiedBy;
    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    private String modifiedName;

    @ApiModelProperty(value = "入驻商")
    private String shipmentName;

    @ApiModelProperty(value = "供应商")
    private String supplierName;

    @ApiModelProperty(value = "供应商")
    private String supplierCode;

    @ApiModelProperty(value = "单据类型")
    private String billTypeName;

    @ApiModelProperty(value = "订单数量（拣货任务列表使用）")
    private BigDecimal orderNum;

    /**
     * 创建时间
     * 自动填充
     */
    @ApiModelProperty(hidden = true)
    private String gmtCreated;

    /**
     * 修改时间
     * 自动填充
     */
    @ApiModelProperty(hidden = true)
    private String gmtModified;


    /**
     * 任务明细
     */
    @ApiModelProperty(value = "任务明细")
    private Object items;

    @ApiModelProperty(value = "总数")
    private Long total;

    @ApiModelProperty(value = "拣货任务明细")
    private List<PickingTaskItemVO> pickingTaskItemVOS;

    @ApiModelProperty(value = "拣货任务详情")
    private List<PickingRegisterVO> pickingRegisterVOS;

    @ApiModelProperty(value = "复核任务详情")
    private List<OutboundItemVO> outboundItemVOS;

    @ApiModelProperty(value = "复核任务详情")
    private List<OutboundRegisterVO> outboundRegisterVOS;

    @ApiModelProperty(value = "客户编码")
    private String customerCode;

    @ApiModelProperty(value = "客户名称")
    private String customerName;

    @ApiModelProperty(value = "订单标识")
    private String orderTag;

    @ApiModelProperty(value = "任务数量")
    private BigDecimal taskNum;

    @ApiModelProperty(value = "波次号")
    private String wavePickingCode;

    @ApiModelProperty(value = "是否预打包订单:0否1是")
    private Integer prepackaged;

    @ApiModelProperty(value = "订单种数")
    private Integer deliveryCount;

}
